<?php
/**
 * Notes:
 * User: wudg <544038230@qq.com>
 * Date: 2025/3/31 11:39
 */

namespace App\Exception;


use App\Constants\System\HttpCode;
use Hyperf\Server\Exception\ServerException;
use Throwable;

class ServiceException extends ServerException
{
    public function __construct($message = '', $code = 500, Throwable $previous = null)
    {
        if ($code === null) {
            $code = HttpCode::BAD_REQUEST;
        }

        parent::__construct($message, $code, $previous);
    }

}